package com.yequan.work;

import com.alibaba.fastjson.JSON;

import java.text.*;
import java.util.*;

/**
 * @author yequan
 * @date 2021/01/25 17:22
 **/
public class TestBaseCoronavirusCarpoolLimit {

    public static void main(String[] args) throws ParseException {
        update();

    }


    private static void update() throws ParseException {
        BaseCoronavirusCarpoolLimit baseCoronavirusCarpoolLimit1 = new BaseCoronavirusCarpoolLimit();
        baseCoronavirusCarpoolLimit1.setCityId(1);
        baseCoronavirusCarpoolLimit1.setBusinessType(1);
        baseCoronavirusCarpoolLimit1.setStartTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210125000000"));
        baseCoronavirusCarpoolLimit1.setEndTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210130000000"));
        baseCoronavirusCarpoolLimit1.setStatus(1);
        baseCoronavirusCarpoolLimit1.setCreateTime(new Date());
        baseCoronavirusCarpoolLimit1.setUpdateTime(new Date());

        BaseCoronavirusCarpoolLimit baseCoronavirusCarpoolLimit2 = new BaseCoronavirusCarpoolLimit();
        baseCoronavirusCarpoolLimit2.setCityId(2);
        baseCoronavirusCarpoolLimit2.setBusinessType(1);
        baseCoronavirusCarpoolLimit2.setStartTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210125000000"));
        baseCoronavirusCarpoolLimit2.setEndTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210130000000"));
        baseCoronavirusCarpoolLimit2.setStatus(1);
        baseCoronavirusCarpoolLimit2.setCreateTime(new Date());
        baseCoronavirusCarpoolLimit2.setUpdateTime(new Date());

        List<BaseCoronavirusCarpoolLimit> baseCoronavirusCarpoolLimits = new ArrayList<>();
        baseCoronavirusCarpoolLimits.add(baseCoronavirusCarpoolLimit1);
        baseCoronavirusCarpoolLimits.add(baseCoronavirusCarpoolLimit2);

        String data = JSON.toJSONString(baseCoronavirusCarpoolLimits);
        System.out.println(data);
    }


    private static void insert() throws ParseException {
        BaseCoronavirusCarpoolLimit baseCoronavirusCarpoolLimit1 = new BaseCoronavirusCarpoolLimit();
        baseCoronavirusCarpoolLimit1.setCityId(1);
        baseCoronavirusCarpoolLimit1.setBusinessType(1);
        baseCoronavirusCarpoolLimit1.setStartTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210125000000"));
        baseCoronavirusCarpoolLimit1.setEndTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210130000000"));
        baseCoronavirusCarpoolLimit1.setStatus(0);
        baseCoronavirusCarpoolLimit1.setCreateTime(new Date());
        baseCoronavirusCarpoolLimit1.setUpdateTime(new Date());

        BaseCoronavirusCarpoolLimit baseCoronavirusCarpoolLimit2 = new BaseCoronavirusCarpoolLimit();
        baseCoronavirusCarpoolLimit2.setCityId(2);
        baseCoronavirusCarpoolLimit2.setBusinessType(1);
        baseCoronavirusCarpoolLimit2.setStartTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210125000000"));
        baseCoronavirusCarpoolLimit2.setEndTime(new SimpleDateFormat("yyyyMMddHHmmss").parse("20210130000000"));
        baseCoronavirusCarpoolLimit2.setStatus(0);
        baseCoronavirusCarpoolLimit2.setCreateTime(new Date());
        baseCoronavirusCarpoolLimit2.setUpdateTime(new Date());

        List<BaseCoronavirusCarpoolLimit> baseCoronavirusCarpoolLimits = new ArrayList<>();
        baseCoronavirusCarpoolLimits.add(baseCoronavirusCarpoolLimit1);
        baseCoronavirusCarpoolLimits.add(baseCoronavirusCarpoolLimit2);

        String data = JSON.toJSONString(baseCoronavirusCarpoolLimits);
        System.out.println(data);
    }

}
